package com.example.wechat;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.ArrayList;

@Controller
public class TestController {
    @RequestMapping("/hi")
    public ModelAndView sayHello() {
        ModelAndView mv=new ModelAndView();
        mv.addObject("newText","你好，springboot-thymeleaf");
        mv.addObject("nonceStr","12e213131");
        mv.addObject("prepayId","MIID4DCCAsigAwIBAgIUd1bMmdMrlBuq");
        mv.addObject("sign","13245674878468574987wdeqweqwqw");
        mv.addObject("l",System.currentTimeMillis() / 100);
        mv.setViewName("test.html");
        return mv;
    }

    @RequestMapping("/hi1")
    public String sayHello1() {
        return "test";
    }
}
